#ifndef DEVICEMONITORPANEL_H
#define DEVICEMONITORPANEL_H

#include <QWidget>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QLabel>
#include "StatusIndicator.h"

class DeviceMonitorPanel : public QWidget
{
    Q_OBJECT

public:
    explicit DeviceMonitorPanel(QWidget *parent = nullptr);

    // 设备状态控制方法
    void setEEGStatus(StatusIndicator::DeviceStatus status, double quality = 0.0);
    void setECGStatus(StatusIndicator::DeviceStatus status, double quality = 0.0);
    void setGSRStatus(StatusIndicator::DeviceStatus status, double quality = 0.0);

    // 获取状态指示器
    StatusIndicator* getEEGIndicator() const { return m_eegIndicator; }
    StatusIndicator* getECGIndicator() const { return m_ecgIndicator; }
    StatusIndicator* getGSRIndicator() const { return m_gsrIndicator; }

    // 添加设置设备标签字体的方法
    void setDeviceLabelsFont(const QFont &font);

signals:
    // 添加设备状态点击信号
    void deviceStatusClicked(const QString &deviceName);

private:
    void setupUI();

    StatusIndicator *m_eegIndicator;
    StatusIndicator *m_ecgIndicator;
    StatusIndicator *m_gsrIndicator;
    QLabel *m_logoLabel;
};

#endif // DEVICEMONITORPANEL_H
